package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.RoomType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface RoomTypeMapper {
    List<RoomType> getRoomTypeByHotelId(Long hotelId);

    void addRoomType(RoomType roomType);

    void updateRoomType(RoomType roomType);

    @Select("select * from room_type where id = #{id}")
    RoomType getRoomTypeById(Long id);

    // 将is_delete字段设置为1
    @Update("update room_type set is_delete = 1 where id = #{id}")
    void deleteRoomType(Long id);
}
